getaddrinfo-is-threadsafe
authorDebian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>
Sun, 23 Dec 2018 20:50:40 +0000 (20:50 +0000)
committerRyan Tandy <ryan@nardis.ca>
Sun, 23 Dec 2018 20:50:40 +0000 (20:50 +0000)
commit4488a83160014cdfdea064d9fa3d7eaf63daebb0
tree53bdd3173265ec62ec346e7884d7b7577afe4481
parent2191a2bbfb236164657b000254ad85e2626e7509
getaddrinfo-is-threadsafe

OpenLDAP upstream conservatively assumes that certain resolver functions
(getaddrinfo, getnameinfo, res_query, dn_expand) are not re-entrant; but we
know that the glibc implementations of these functions are thread-safe, so
we should bypass the use of this mutex.  This fixes a locking problem when
an application uses libldap and libnss-ldap is also used for hosts
resolution.

Closes Debian bug #340601.

Not suitable for forwarding upstream; might be made suitable by adding a
configure-time check for glibc and disabling the mutex only on known
thread-safe implementations.

Gbp-Pq: Name getaddrinfo-is-threadsafe
libraries/libldap/os-ip.c
libraries/libldap/util-int.c